var wxOauth_url="https://wx.whyimingkeji.com/zcivcase/index.php?sjdhdh-wxoauth";//微信授权
var mySwiper,mySwiper2
// var _mid;
// _mid = getQueryVariable("mid");
$(document).ready(function()
{
	console.log("app")
	setData();
	setEvent();
})

function init()
{
	 $(".load-div").fadeOut();
	 $(".swiper-container").fadeIn();
	//alert("getUserData");
}
function setData(){
	mySwiper = new Swiper('.swiper-container', {
		spaceBetween: 0,
		noSwiping : true,
		// direction: 'vertical',
		direction: 'horizontal',
		observer:true,
		observeParents:true,
		autoHeight: true, 
		loop:true,
		on:{
			init: function(){
				swiperAnimateCache(this); //隐藏动画元素 
				swiperAnimate(this); //初始化完成开始动画
				
			}, 
			slideChangeTransitionStart: function(){
				// console.log("slideChangeTransitionStart:"+this.activeIndex);
			},
			slideChangeTransitionEnd: function(){ 
				swiperAnimate(this); //每个slide切换结束时也运行当前slide动画
				//this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); 动画只展现一次，去除ani类名
				console.log("slideChangeTransitionEnd:"+this.activeIndex);
				// console.log("slideChangeTransitionEnd:"+this.realIndex);
			},
		}
	});
	mySwiper2 = new Swiper ('.swiper2', {
		spaceBetween: 0,
		direction: 'horizontal', // 垂直切换选项
		loop: true, // 循环模式选项
		noSwiping : false,
		observer:true,
		observeParents:true,
		autoHeight: true, 
		// 如果需要前进后退按钮
		navigation: {
			nextEl: '.swiper-button-next',
			prevEl: '.swiper-button-prev',
		},
		on:{
			init: function(){
				swiperAnimateCache(this); //隐藏动画元素 
				swiperAnimate(this); //初始化完成开始动画
			}, 
			slideChangeTransitionStart: function(){
				// console.log("slideChangeTransitionStart:"+this.activeIndex);
			},
			slideChangeTransitionEnd: function(){ 
				swiperAnimate(this); //每个slide切换结束时也运行当前slide动画
				//this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); 动画只展现一次，去除ani类名
				console.log("slideChangeTransitionEnd:"+this.activeIndex);
					
			},
		}
	}) 
	
}
function gotoPage(n){
	console.log(n)
	mySwiper.slideTo(n,1000,true)
	
}
function setEvent(){
	// $(".p1_btn").click(function(){
	// 	console.log('点击')
	// 	gotoPage(2)
	// });
}
